'''
Created on Oct 20, 2014

@author: azhelezny
'''
translationTable = {}

translationTable['UUU'] = 'F'
translationTable['CUU'] = 'L'
translationTable['AUU'] = 'I'
translationTable['GUU'] = 'V'
translationTable['UUC'] = 'F'
translationTable['CUC'] = 'L'
translationTable['AUC'] = 'I'
translationTable['GUC'] = 'V'
translationTable['UUA'] = 'L'
translationTable['CUA'] = 'L'
translationTable['AUA'] = 'I'
translationTable['GUA'] = 'V'
translationTable['UUG'] = 'L'
translationTable['CUG'] = 'L'
translationTable['AUG'] = 'M'
translationTable['GUG'] = 'V'
translationTable['UCU'] = 'S'
translationTable['CCU'] = 'P'
translationTable['ACU'] = 'T'
translationTable['GCU'] = 'A'
translationTable['UCC'] = 'S'
translationTable['CCC'] = 'P'
translationTable['ACC'] = 'T'
translationTable['GCC'] = 'A'
translationTable['UCA'] = 'S'
translationTable['CCA'] = 'P'
translationTable['ACA'] = 'T'
translationTable['GCA'] = 'A'
translationTable['UCG'] = 'S'
translationTable['CCG'] = 'P'
translationTable['ACG'] = 'T'
translationTable['GCG'] = 'A'
translationTable['UAU'] = 'Y'
translationTable['CAU'] = 'H'
translationTable['AAU'] = 'N'
translationTable['GAU'] = 'D'
translationTable['UAC'] = 'Y'
translationTable['CAC'] = 'H'
translationTable['AAC'] = 'N'
translationTable['GAC'] = 'D'
translationTable['UAA'] = 'Stop'
translationTable['CAA'] = 'Q'
translationTable['AAA'] = 'K'
translationTable['GAA'] = 'E'
translationTable['UAG'] = 'Stop'
translationTable['CAG'] = 'Q'
translationTable['AAG'] = 'K'
translationTable['GAG'] = 'E'
translationTable['UGU'] = 'C'
translationTable['CGU'] = 'R'
translationTable['AGU'] = 'S'
translationTable['GGU'] = 'G'
translationTable['UGC'] = 'C'
translationTable['CGC'] = 'R'
translationTable['AGC'] = 'S'
translationTable['GGC'] = 'G'
translationTable['UGA'] = 'Stop'
translationTable['CGA'] = 'R'
translationTable['AGA'] = 'R'
translationTable['GGA'] = 'G'
translationTable['UGG'] = 'W'
translationTable['CGG'] = 'R'
translationTable['AGG'] = 'R'
translationTable['GGG'] = 'G'

def translateCodone(codon):
    if(translationTable[codon] == "Stop"):
        return ""
    return translationTable[codon]

rnaString = "AUGGCCAUGGCGCCCAGAACUGAGAUCAAUAGUACCCGUAUUAACGGGUGA"

rnaLen = len(rnaString)
codonSize = 3

if(rnaLen % codonSize != 0):
    print("wrong length of RNA string")
    exit

codonsCount = int(rnaLen / codonSize)
result = ""

for i in range (0, codonsCount):
    result += translateCodone(rnaString[i * codonSize:3 + i * codonSize])
print(result)
